<?php

namespace app\index\controller;

use app\index\model\Banner as BannerModel;
use app\index\model\Config as ConfigModel;
use think\Controller;
use think\Request;

class Brand extends BaseController
{
    public function __construct(Request $request = null)
    {
        parent::__construct($request);
        $banner = BannerModel::getBanner('brand');
        $this->assign('banner', $banner);
    }

    /**
     * 多燕瘦
     * @return mixed
     */
    public function duoyanshou()
    {
        $duoyanshou = ConfigModel::getBaseValue('duoyanshou');
        $duoyanshou = $this->changeResponse($duoyanshou);
        $banner = BannerModel::getBanner('duoyanshou');
        $this->assign('banner', $banner);
        $this->assign('duoyanshou', $duoyanshou);
        return $this->fetch('duoyanshou');
    }

    /**
     * 轻食兔
     * @return mixed
     */
    public function qingshitu()
    {
        $qingshitu = ConfigModel::getBaseValue('qingshitu');
        $qingshitu = $this->changeResponse($qingshitu);
        $banner = BannerModel::getBanner('qingshitu');
        $this->assign('banner', $banner);
        $this->assign('qingshitu', $qingshitu);
        return $this->fetch('qingshitu');
    }

}
